import { defineStore } from 'pinia'
import { ref } from 'vue'

export const useUserStore = defineStore('user', () => {
  // 定义 state
  const token = ref<string | null>(null)
  // 千万不要忘记这里要 return
  return { token }
},{
    // unistorage:true
    unistorage:{
        key:'cp-patient-user',
        paths:['token']
    }
})